import {
	onLoad
} from "@dcloudio/uni-app";
export function useSwitchTab() {
	const toIndex = (index) => {
		if (index === 0) {
			uni.switchTab({
				url: '/pages/index/index'
			})
		} else if (index === 1) {
			uni.switchTab({
				url: '/pages/fashionPurchase/index'
			})
		} else if (index === 2) {
			uni.switchTab({
				url: '/pages/explore/index'
			})
		} else if (index === 3) {
			uni.switchTab({
				url: '/pages/mine/index'
			})
		}
	}

	return {
		toIndex
	}
}